/**
 * author: 何其沆(pooky)
 * desc: Statistics - api
 * date: 2022-03-28
 */
import { get, post } from '@/utils/request.js'
import api from '@/config/index.js'

export default {
  /**
   * 获取Invoice Number Year
   * @returns {Promise | Promise<unknown>}
   */
  getInvoiceNumberYear() {
    return get(api.API_VERSION + '/Others/Statistics/InvoiceNumber/GetYears', {}, false)
  },
  /**
   * 获取Invoice Number Month
   * @returns {Promise<unknown>}
   */
  getInvoiceNumberMonth() {
    return get(api.API_VERSION + '/Others/Statistics/InvoiceNumber/GetMonths', {}, false)
  },
  /**
   * 获取Invoice Number下Invoices列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getInvoiceNumberInvoicesList(data) {
    return post(api.API_VERSION + '/Others/Statistics/InvoiceNumber/QueryPages', data, false)
  },
  /**
   * 获取Invoice Number下Client列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getInvoiceNumberClientList(data) {
    return post(api.API_VERSION + '/Others/Statistics/InvoiceNumber/InvoicesListByClients', data, false)
  },
  /**
   * 获取Payment Received下Invoices列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getPaymentReceivedInvoicesList(data) {
    return post(api.API_VERSION + '/Others/Statistics/PaymentReceived/QueryPages', data, false)
  },
  /**
   * 获取Payment Received下Client列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getPaymentReceivedClientList(data) {
    return post(api.API_VERSION + '/Others/Statistics/PaymentReceived/InvoicesListByClients', data, false)
  },
  /**
   * 获取Project Details列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getProjectDetailsList(data) {
    return post(api.API_VERSION + '/Others/Statistics/ProjectDetails/ProjectDetailsList', data, false)
  },
  /**
   * 获取Purchase Order下PO列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getPurchaseOrderPoList(data) {
    return post(api.API_VERSION + '/Others/Statistics/PurchaseOrder/QueryPages', data, false)
  },
  /**
   * 获取Purchase Order下Client列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getPurchaseOrderClientList(data) {
    return post(api.API_VERSION + '/Others/Statistics/PurchaseOrder/POListByClients', data, false)
  },
  /**
   * 获取管理端Invoice Number下Clients列表
   * @param data
   * @returns {Promise<unknown>}
   */
  getAdminInvoiceNumberClients(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/InvoiceNumber/InoviceListByClient', data, false)
  },
  /**
   * 获取管理端Invoice Number下Personnel列表
   * @param data
   * @returns {Promise<unknown>}
   */
  getAdminInvoiceNumberPersonnel(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/InvoiceNumber/InvoiceListByPersonnel', data, false)
  },
  /**
   * 获取管理端Invoice Number下Personnel&Client列表
   * @param data
   * @returns {Promise<unknown>}
   */
  getAdminInvoiceNumberPersonnelClient(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/InvoiceNumber/InvoiceListByClientPersonnel', data, false)
  },
  /**
   * 获取管理端Invoice Number下Personnel&Client列表
   * @param data
   * @returns {Promise<unknown>}
   */
  getAdminInvoiceNumberBranches(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/InvoiceNumber/InvoiceListByBranch', data, false)
  },
  /**
   * 获取管理端Payment Received下Clients列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPaymentReceivedClient(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/PaymentReceived/PaymentReceivedListByClient', data, false)
  },
  /**
   * 获取管理端Payment Received下Personnel列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPaymentReceivedPersonnel(data) {
    return post(
      api.API_VERSION + '/Admin/Others/Statistics/PaymentReceived/PaymentReceivedListByPersonnal',
      data,
      false
    )
  },
  /**
   * 获取管理端Payment Received下Personnel&Client列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPaymentReceivedPersonnelClient(data) {
    return post(
      api.API_VERSION + '/Admin/Others/Statistics/PaymentReceived/PaymentReceivedListByClientPersonnel',
      data,
      false
    )
  },
  /**
   * 获取管理端Payment Received下Branches列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPaymentReceivedBranches(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/PaymentReceived/PaymentReceivedListByBranch', data, false)
  },
  /**
   * 获取管理端Project Details列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminProjectDetails(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/ProjectDetails/GetProjectDetailsList', data, false)
  },
  /**
   * 获取管理端Purchase Order下PO列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPurchaseOrderPOList(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/PurchaseOrder/PurchaseOrderList', data, false)
  },
  /**
   * 获取管理端Purchase Order下Client列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPurchaseOrderClientList(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/PurchaseOrder/PurchaseOrderListByClient', data, false)
  },
  /**
   * 获取管理端Purchase Order下Sales Personnel列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPurchaseOrderPersonnelList(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/PurchaseOrder/PurchaseOrderListByPersonnal', data, false)
  },
  /**
   * 获取管理端Purchase Order下Branches列表
   * @param data
   * @returns {Promise | Promise<unknown>}
   */
  getAdminPurchaseOrderBranchesList(data) {
    return post(api.API_VERSION + '/Admin/Others/Statistics/PurchaseOrder/PurchaseOrderListByBranch', data, false)
  }
}
